#pragma config(Hubs,  S1, HTServo,  none,     none,     none)
#pragma config(Sensor, S1,     ,               sensorI2CMuxController)
#pragma config(Servo,  srvo_S1_C1_1,    stdServo,             tServoStandard)
#pragma config(Servo,  srvo_S1_C1_2,    contServo,            tServoContinuousRotation)
#pragma config(Servo,  srvo_S1_C1_3,    servo3,               tServoNone)
#pragma config(Servo,  srvo_S1_C1_4,    servo4,               tServoNone)
#pragma config(Servo,  srvo_S1_C1_5,    servo5,               tServoNone)
#pragma config(Servo,  srvo_S1_C1_6,    servo6,               tServoNone)
//*!!Code automatically generated by 'ROBOTC' configuration wizard               !!*//

#include <JoystickDriver.c>

task main()
{
	while (1)
	{
		getJoystickSettings(joystick);
		if (joy1Btn(6) == 1) {
			servo [stdServo] = 0;
		}
		else if (joy1Btn(8) == 1) {
			servo [stdServo] = 255;
		}
		if (joy1Btn(5) == 1) {
			servo [contServo] = 0;
		}
		else if (joy1Btn(7) == 1) {
			servo [contServo] = 255;
			} else {
			servo [contServo] = 127;
		}
	}
}
